<#assign dialogId = id + "cat"/>
<a id="edit-category-button-${dialogId}" class="edit-button" href="javascript: void(0);">
</a>
<div id="${dialogId}" title="${uiLabelMap.RestaurantEditCategory}">
  <p id="errorMessage${dialogId}"></p>
  <form name="updateCategory${dialogId}" action="<@ofbizUrl>updateCategory</@ofbizUrl>" method="post">
    <input name="productCategoryId" type="hidden" value="${categoryEntry.productCategoryId}"/>
    <table class="basic-table" cellspacing="0">
          <tbody>
          <tr>
            <td class="label">${uiLabelMap.CommonName}</td>
            <td><input type="text" name="categoryName" id="name" value="${categoryEntry.categoryName?if_exists}" class="text ui-widget-content ui-corner-all"></td>
          </tr>
          <#-- tr>
            <td class="label">${uiLabelMap.CommonDescription}</td>
            <td><input type="text" name="description" id="email" value="${categoryEntry.description?if_exists}" class="text ui-widget-content ui-corner-all"></td>
          </tr -->
          <tr>
            <td></td>
            <td><input type="submit" tabindex="-1" style="position:absolute; top:-1000px"></td>
          </tr>
        </tbody>
    </table>
  </form>
</div>
<script>
    function updateCategory${dialogId} () {
        submitDialogForm("${dialogId}", document.updateCategory${dialogId});
        return false;
    }
    var dialog${dialogId} = $( "#${dialogId}" ).dialog({
      autoOpen: false,
      height: 200,
      width: 350,
      modal: true,
      buttons: {
        "${StringUtil.wrapString(uiLabelMap.RestaurantSave)}": updateCategory${dialogId},
        "${StringUtil.wrapString(uiLabelMap.RestaurantCancel)}": function() {
          dialog${dialogId}.dialog( "close" );
        }
      },
      close: function() {
        //$(document.updateCategory${dialogId}).reset();;
      }
    });
    
    $("#edit-category-button-${dialogId}").button().on( "click", function() {
        dialog${dialogId}.dialog( "open" );
    });
  </script>